home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Libris Britannia 4
/
science library(b).zip
/
science library(b)
/
PROGRAMM
/
MODULA_2
/
2394.ZIP
/
M2TOOLS1.ZIP
/
PRINTERO.DEF
< prev
next >
Wrap
Text File
|
1990-08-08
|
3KB
|
98 lines
DEFINITION MODULE PrinterOps;
TYPE
TypeFaceType = (Expanded, Condensed, Italic, NLQ, Bold, Emphasis,
Proportional, Underlined, Superscript, Subscript);
PitchType = (Pica, Elite);
AlignmentType = (Left, Centre, Right);
MarginType = (TopMargin, BottomMargin, LeftMargin, RightMargin);
PROCEDURE PWrite (Ch : CHAR);
(* Prints a character on the printer *)
PROCEDURE PWriteCard (Card,
Width : CARDINAL);
(* Prints a cardinal number on the printer *)
PROCEDURE PWriteInt (Int,
Width : INTEGER);
(* Prints an integer number on the printer *)
PROCEDURE PRept (Char : CHAR;
No : CARDINAL);
(* This procedure will print Char No times on the printer *)
PROCEDURE PWriteLn;
(* This procedure will advance the printer head one line and back to
the left hand side *)
PROCEDURE PWriteString (String : ARRAY OF CHAR);
(* Prints a string of characters to the printer *)
PROCEDURE SetTypeFace (TypeFace : TypeFaceType);
(* Changes the typeface to one of the ones above (from TypeFaceType).
e.g. SetTypeFace (Italic)
In order to achieve, for example, bold italic, you would need to
have two calls of this procedure - one with bold and one with italic,
in any order. *)
PROCEDURE SetPitch (Pitch : PitchType);
(* Choose the Pitch from the PitchTypes above.
e.g. SetPitch (Elite) *)
PROCEDURE CancelTypeFace (TypeFace : TypeFaceType);
(* Select TypeFace from TypeFaceType above.
e.g. CancelTypeFace (Italic)
If you were currently printing in bold italic and wanted to just print
bold then use the example above (3 lines up) *)
PROCEDURE SetAlignment (Alignment : AlignmentType);
(* e.g. SetAlignment (Right) will justify all printing to the right *)
PROCEDURE EjectPage;
(* Best used to make sure all the text sent to the printer is actually
printed, as text is stored in the printer's buffer until an EOL
character is received. Used most at the end of each page. *)
PROCEDURE ResetPrinter;
(* This cancels any settings that have been made, e.g. margin settings, or
type face settings. It also resets the top of page to be the line the
printer head is on *)
PROCEDURE SetPageLength (PageLength : ARRAY OF CHAR);
(* In Inches *)
PROCEDURE SetPageLines (PageLines : ARRAY OF CHAR);
(* In Lines *)
PROCEDURE SetMargin (Margin : MarginType;
Width : ARRAY OF CHAR);
(* In lines not inches.
Choose Margin from MarginType at the top *)
PROCEDURE LargeChars (Code : CHAR);
(* 0 - Cancel enlargement
1 - Double high, double wide
2 - Quadruple high, quadruple wide *)
END PrinterOps.